//
//  OemView.m
//  XRmenu
//
//  Created by Gao Yan on 11-11-23.
//  Copyright 2011年 foxhis. All rights reserved.
//

#import "OemView.h"


@implementation OemView


- (id)initWithFrame:(CGRect)frame OEM:(NSString*)apath{
    
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code.
		self.backgroundColor = [UIColor brownColor];
		UIImageView *bg = [[UIImageView alloc] initWithFrame:frame];
		UIImage *bgimg = [[UIImage alloc] initWithContentsOfFile:apath];
		[bg setImage:bgimg];
		[self addSubview:bg];
		[bgimg release];
		[bg release];
		
		[self add1fingerTap];
		[self performSelector:@selector(closeOEMView) withObject:nil afterDelay:5];
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code.
}
*/

- (void)dealloc {
    [super dealloc];
}

- (void)handleTapFrom:(UITapGestureRecognizer *)recognizer
{
	[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(closeOEMView) object:nil];
	[self closeOEMView];
}

-(void) closeOEMView
{
    APPSESSION.isViewRemoveFromLef=YES;
    NSDictionary *infos1 = [NSDictionary dictionaryWithObjectsAndKeys:num(ViewOfWelcome), @"Step", nil];
    postNWithInfos(kMessage_RootView_ChangeStep, self, infos1);
}
@end
